using System;
using System.IO;

namespace weatherService
{
  internal enum EntryType
  {
    Info,
    Error,
  }

  internal class Logger
  {
    private readonly string m_path;

    public Logger(string path)
    {
      m_path = path;
    }

    public void Log(EntryType type, string message)
    {
      using (StreamWriter sr = new StreamWriter(m_path, true))
      {
        sr.WriteLine("{0} -> {1}:{2}", DateTime.Now, type, message);
      }
    }

  }
}